home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / More Source / C⁄C++ / Marathon Map Viewer / @Source / levelView.h < prev    next >
Text File  |  1995-06-05  |  1KB  |  46 lines

  1. /*-----------------------------------------------------------------
  2.     Copyright ©1994 Steve Israelson
  3. -----------------------------------------------------------------*/
  4.  
  5. #pragma once
  6.  
  7. #include <LView.h>
  8. #include <LCommander.h>
  9.  
  10. #include "marathonTypes.h"
  11.  
  12. class levelView : public LView, public LCommander
  13.     {
  14. public:
  15.     enum { class_ID = 'mapv' };
  16.     Boolean                showGrid, showPoints, showLines, showObjects;
  17.  
  18.     levelData            *theLevelData;
  19.     long                scaleFactor;
  20.     long                offset;
  21.  
  22.     static levelView        *CreateViewStream(LStream *inStream);
  23.                         levelView(LStream *inStream);
  24.                         levelView(const SPaneInfo &inPaneInfo, const SViewInfo &inViewInfo);
  25.     virtual                ~levelView();
  26.     virtual void        DrawSelf();    
  27.     virtual void        FinishCreate();
  28.  
  29.     void                drawGrid(void);
  30.     void                drawObject(short x);
  31.     void                setLevelData(levelData*);
  32.     void                drawLines(void);
  33.     void                drawPoints(void);
  34.     void                drawPolygons(void);
  35.     void                drawObjects(void);
  36.     void                 setScale(long newScale, Point);
  37.     void                fixImageSize(void);
  38.     PolyHandle            makePolyPolygon(long thePoly);
  39.  
  40.     virtual void        ClickSelf(const SMouseDownEvent &inMouseDown);
  41.     virtual Boolean        ObeyCommand(CommandT inCommand, void *ioParam = nil);
  42.     virtual void        FindCommandStatus(CommandT inCommand,
  43.                             Boolean &outEnabled, Boolean &outUsesMark,
  44.                             Char16 &outMark, Str255 outName);
  45.     };
  46.